feat(table): send x-kyte-fields projection header from KyteTable (KYTE-#190) - #39
Open
kennethphough wants to merge 1 commit into
Open
feat(table): send x-kyte-fields projection header from KyteTable (KYTE-#190)#39kennethphough wants to merge 1 commit into
kennethphough wants to merge 1 commit into
Conversation
…E-#190) KyteTable now sends an `x-kyte-fields` header listing the columns it displays, so a list read returns only those columns instead of every column — keeping large TEXT/BLOB columns out of list payloads. The value is the same field list the table already derives from its columnDefs (dotted FK paths like `client.name` included), sent as a header distinct from `x-kyte-page-search-fields` (search = which columns to match; projection = which columns to return). Pairs with the kyte-php >= 4.16 server wiring, which maps dotted FK paths to their base column and always re-adds id + FK ids, so row actions and FK labels keep working. Backward compatible: an older server ignores the header. Vitest suite green (17 tests). Release (CDN) is a separate manual step. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The client half of the KYTE-#190 column-projection feature — makes it live end-to-end.
What
KyteTable._loadDatanow sends anx-kyte-fieldsheader (one line) listing the columns the table displays. The server then returns only those columns for the list read, keeping largeTEXT/BLOBcolumns out of list payloads.columnDefs(kyte-source.js:1491-1496) — dotted FK paths likeclient.nameincluded. Zero new developer config.x-kyte-page-search-fields(search = which columns to LIKE-match; projection = which columns to return).Server pairing
Requires kyte-php ≥ 4.16 (the generic
ModelControllerprojection wiring). The server maps dotted FK paths to their base column and always re-addsid+ FK ids, so row actions, edit/delete, and FK labels keep working. Backward compatible — an older server ignores the header.Validation
KyteTableisn't in the unit harness (no DOM/jQuery mocks), so recommend a manual smoke on a real table before release.release.sh→ deploy ritual) — not triggered by this PR.Refs #190.
🤖 Generated with Claude Code